import request from '@/utils/request';

/**
 * 分页查询物资
 * @param {} current 
 * @param {*} size 
 * @param {*} inStockVO 
 * @returns 
 */
export function findInStockList(current,size,inStockVO){
    return request({
        url: '/biz/inStock/findInStockList',
        method: 'post',
        params: {
            current,
            size
        },
        data : inStockVO
    })
}

/**
 * 删除入库清单
 * @param {*} id 
 * @param {*} inNum 
 */
export function del(id,inNum){
    return request({
        url : '/biz/inStock/delInStock',
        method : 'delete',
        params: {
            id,
            inNum
        }
    })
}

/**
 * 恢复入库清单
 * @param {} id 
 */
export function back(id){
    return request({
        url : '/biz/inStock/backInStock',
        method : 'put',
        params: {
            id
        }
    })
}

/**
 * 移至回收站
 * @param {*} id 
 */
export function remove(id){
    return request({
        url : '/biz/inStock/remove',
        method: 'delete',
        params: {
            id
        }
    })
}

/**
 * 入库审核通过
 * @param {} id 
 * @param {*} inNum 
 */
export function publish(id,inNum){
    return request({
        url : '/biz/inStock/pulishInStock',
        method : 'post',
        params: {
            id,
            inNum
        }
    })
}

/**
 * 添加入库申请
 */
export function addIntoStock(intoStockVO){
    return request({
        url: '/biz/inStock/addIntoStock',
        method: 'post',
        data: intoStockVO
    })
}

/**
 * 入库详情
 * @param {} inNum 
 * @param {*} supplierId 
 * @param {*} current 
 */
export function detail(inNum,supplierId,current){
    return request({
        url : '/biz/inStock/detail',
        method: 'post',
        params: {
            inNum,
            supplierId,
            current,
        }
    })
}